I am new to DXL, please help.
I am attempting to write a layout DXL script that allows me to display in links from multiple modules to individual columns (each module will have in links from multiple modules). I started with the canned layout DXL script (simpletr.dxl) which will display all in links from all modules in the same column, but what I want is in links from each module to display in separate columns. What I am doing below (that doesn’t work) is checking for attributes that I know are specific to the module I want in links to display in the column.
What I have doesn’t work, but I included it here anyway. PLEASE HELP.
The lines that don’t work follow;
// Only show traces from this module
// check for an attribute that only exists in this module
if(exists (attribute "TraceToCANES"))
{……
Full script follows;
// TJCJr_02_SoSEng_PEOSpec_C4I_TraceFromPEOSpecONLY_v130
//
// Date Who Description
// 20121212 TJCJr Borrowed this from the example trace DXL
// 20121231 TJCJr Changed what attributes are displayed in the column
// 20121231 TJCJr Only displays in-links from this spec ONLY based on attribute in this module
//
// Original Comments
// Example trace analysis
//
// Licensed Materials - Property of IBM - some unique copyrights (i.e., the ability to copy,
// modify, distribute) may be licensed in certain circumstances (e.g., sample/template code
// intended to be used by customers to build upon and distribute as their own products).
//
// DOORS - %full_filespec: simpletr.dxl~8:dxl:ERS#1 % %date_created: Thu Jan 8 15:24:17 2009 %
//
// (c) Copyright IBM Corporation 1993, 2009. All Rights Reserved.
//
// U.S. Government Users Restricted Rights: Use, duplication or disclosure restricted by
// GSA ADP Schedule Contract with IBM Corp.
//
/*
A basic first-level analysis of all in-links is performed - displaying the Absolute Number
and Object Text of all linked objects.
This file is intended to be easily changed and as such no checks are performed for correct
access controls on objects or object attributes.
To examine other attributes then just change the constants S_ATTR_1 / S_ATTR_2.
To examine more attributes then just duplicate S_ATTR_1 / S_ATTR_2 as well as the lines that
display their actual values.
It should be noted that no checks are performed either on the existence of these attributes
or on their access controls, so you may experience DXL errors unless they are correctly named
and you have read access to them.
If you intend to modify functionality then please make a copy of the original file first.
*/
// prevent dxl timeout dialog
pragma runLim, 0
// change these lines to display different attributes
const string S_ATTR_1 = (NLS_("Absolute Number"))
const string S_ATTR_2 = (NLS_("Object Heading"))
const string S_ATTR_3 = (NLS_("Object Text"))
// Attribute used as a check of this object
const string S_ATTR_4 = (NLS_("Spec"))
Module m = current
Object o = current
// display in-link information
{
Link l
LinkRef lr
// process in-links
for lr in all(obj <- (NLS_("*"))) do
{
// get absolute location of linked module
ModuleVersion sourceVer = sourceVersion(lr)
// only relevant if module exists
if (exists(module sourceVer))
{
// only relevant if module is closed
if (null data(sourceVer))
{
// ensure module is open
load(sourceVer, false)
}
}
}
// process in-links
for l in all(obj <- (NLS_("*"))) do
{
// get absolute location of linked module
ModuleVersion sourceVer = sourceVersion(l)
// only relevant if module exists
if (exists(module sourceVer))
{
Object oSource = source l
// validate handle
if (oSource != null)
{
// Only show traces from this module
// check for an attribute that only exists in this module
if(exists (attribute "TraceToCANES"))
{
// display attribute values
display S_ATTR_1 (NLS_(": ")) oSource.S_ATTR_1 (NLS_(""))
display S_ATTR_2 (NLS_(": ")) oSource.S_ATTR_2 (NLS_(""))
display S_ATTR_3 (NLS_(": ")) oSource.S_ATTR_3 (NLS_(""))
// separate by a blank line
display (NLS_(""))
}
}
}
else
{
// warn user
display LS_("String_Invalid_source_module",NLSTEMP_("Invalid source module '")) (fullName sourceVer) (NLS_("'."))
}
}
}
SystemAdmin - Thu Jan 03 13:26:32 EST 2013 |
|
Re: layout DXL to display in links from multiple modules in separate columns SystemAdmin - Thu Jan 03 17:01:43 EST 2013
Try using the DOORS Analysis Wizard feature to create these individual DXL Layout trace columns for you. The Module menu path for this feature is Analysis>Wizard
Paul Miller,
Melbourne, Australia
|
|
Re: layout DXL to display in links from multiple modules in separate columns SystemAdmin - Fri Jan 04 06:37:50 EST 2013 SystemAdmin - Thu Jan 03 17:01:43 EST 2013
Try using the DOORS Analysis Wizard feature to create these individual DXL Layout trace columns for you. The Module menu path for this feature is Analysis>Wizard
Paul Miller,
Melbourne, Australia
Excellent suggestion Mr. Miller, the analysis wizard works great, and does exactly what I need. I should have started there, but then being the inquisitive kind of guy I am I wanted to learn DXL. Some of us learn the hard way. Thanks again.
|
|
Re: layout DXL to display in links from multiple modules in separate columns SystemAdmin - Fri Jan 04 14:21:09 EST 2013 SystemAdmin - Fri Jan 04 06:37:50 EST 2013
Excellent suggestion Mr. Miller, the analysis wizard works great, and does exactly what I need. I should have started there, but then being the inquisitive kind of guy I am I wanted to learn DXL. Some of us learn the hard way. Thanks again.
You may already know this, but if you use your mouse and right-click on the top of the Layout DXL column generated from the Analysis Wizard, then choose "Properties", when the "Edit Column" dialog appears you will see that the Layout DXL radio button is already selected.
Choose the "Browse" button, then click the "Current" button and you will see the DXL that DOORS generated to populate that column.
I learned a lot about DXL by reviewing the scripts generated by the Analysis Wizard in this fashion.
|
|
Re: layout DXL to display in links from multiple modules in separate columns SystemAdmin - Fri Jan 04 14:21:41 EST 2013 SystemAdmin - Fri Jan 04 06:37:50 EST 2013
Excellent suggestion Mr. Miller, the analysis wizard works great, and does exactly what I need. I should have started there, but then being the inquisitive kind of guy I am I wanted to learn DXL. Some of us learn the hard way. Thanks again.
You may already know this, but if you use your mouse and right-click on the top of the Layout DXL column generated from the Analysis Wizard, then choose "Properties", when the "Edit Column" dialog appears you will see that the Layout DXL radio button is already selected.
Choose the "Browse" button, then click the "Current" button and you will see the DXL that DOORS generated to populate that column.
I learned a lot about DXL by reviewing the scripts generated by the Analysis Wizard in this fashion.
|
|